class phone:
    def __init__(self,phone_name,phone_dianchirongliang,phone_daxaio,phone_max):
        self.phone_name = phone_name
        self.phne_dianchirongliang = phone_dianchirongliang
        self.phone_daxaio = phone_daxaio
        self.phone_max = phone_max

class person(phone):
    def __init__(self,name,age,gender,yu_e,jifen,phone_name,phone_dianchirongliang,phone_daxaio,phone_max):
        self.age = age
        self.gender = gender
        self.yu_e = yu_e
        self.jifen = jifen
        phone.__init__(self,phone_name,phone_dianchirongliang,phone_daxaio,phone_max)
#发短信
    def send_messages(self,neirong):

        print(f"短信发送成功！——————发送内容为：{neirong}")
#打电话
    def call(self,phone_namber,time_a):
        if phone_namber !='' and self.yu_e>=1:
            if time_a>=0 and time_a<=10:
                self.yu_e-=time_a
                self.jifen+=(time_a*15)
                print(f"您本次打了：{time_a}，余额剩余:{self.yu_e}，您的积分为;{self.jifen}")
            elif time_a>10 and time_a<=20:
                self.yu_e-=(time_a*0.8)
                self.jifen+=(time_a*39)
                print(f"您本次打了：{time_a}，余额剩余:{self.yu_e}，您的积分为;{self.jifen}")
            elif time_a>20:
                self.yu_e -= (time_a * 0.65)
                self.jifen += (time_a * 48)
                print(f"您本次打了：{time_a}，余额剩余:{self.yu_e}，您的积分为;{self.jifen}")
        elif phone_namber == '' and self.yu_e >=1:
            print("电话号码为空！")
        elif phone_namber != ''and self.yu_e<1:
            print('电话余额少于1元！')

zhangshan=person("张三",22,"男",100,80,
                 "xiaomi",'5000mA',200,'sh')
neirong=input("请输入短信内容：")
zhangshan.send_messages(neirong)
zhangshan.call('100000',22)